package com.credit.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.credit.entity.CreditMessageEntity;

public interface CreditMessageDao extends PagingAndSortingRepository<CreditMessageEntity, Long>, JpaSpecificationExecutor<CreditMessageEntity> {

	@Query("from CreditMessageEntity message where message.userId=?1")
	List<CreditMessageEntity> findMessageByUserId(Long userId);

}
